package com.erbao.thread;

/**
 * @author CaoBaoYin
 * @since 2022/1/2 16:55
 */
public class ThreadSuspendResume {
    public static void main(String[] args) {
        Thread t = new Thread(() -> {
            while (true) {
                System.out.println("go on");
                SleepHelper.sleepSeconds(1);
            }
        });

        t.start();

        SleepHelper.sleepSeconds(5);

        t.suspend();
        SleepHelper.sleepSeconds(3);
        t.resume();

    }

}
